<?php /* УТФ-8:fix */

class SPIcontroller__manage__link extends SPIcontroller__dummy
{
    public function pack( $topic_id, $innertopic_id = null, $vars = null )
    {
        if( is_array( $vars ) === false )
        {
            $vars = array();
        }

        // ----------------------------------------------------------

        $vars['topic'] = $topic_id; 

        if( $innertopic_id !== null )
        {
            $vars['tmode'] = $innertopic_id;
        }

        // ----------------------------------------------------------

        $strvars = '';

        foreach( $vars as $key => $value )
        {
            $strvars .= "&{$key}=".urlencode($value);
        }
        $strvars = ltrim( $strvars, '&' );

        return SPIcfg::$dir['pubsite_root'] . 'manage.php' . ( $strvars ? "?{$strvars}" : '' );
    }

    public function minify( $type )
    {
        return SPIcfg::$dir['pubsite_root'] . 'minify.php?type=manage-'.$type.'&build='.SPIcfg::$util['minify']['build'];;
    }
}